package com.example.sys.wx.controller;

import com.example.core.controller.BaseTreeController;
import com.example.core.utils.Result;
import com.example.sys.wx.service.SysWxMenuService;
import com.example.sys.wx.vo.SysWxMenuVo;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("sysWxMenu")
@RestController
public class SysWxMenuController extends BaseTreeController<SysWxMenuService, SysWxMenuVo> {

    @RequestMapping("sync")
    public Result sync() {
        try {
            this.getService().sync();
            return Result.success();
        } catch (Exception e) {
            e.printStackTrace();
            return Result.error(e.getMessage());
        }
    }
}
